package com.zhf.service;

import com.zhf.bean.Administrator;
import com.zhf.dao.AdministratorDao;
import com.zhf.factory.AdministratorDaoFactory;

/**
 * @Author: ZhaoHuanfeng
 * @Date: 2020/10/16 23:30
 */
public class AdministratorService {
    private AdministratorDao administratorDao;

    /**
     *合成复用原则
     */
    public AdministratorService(){
        this.administratorDao= AdministratorDaoFactory.getAdminDao();
    }

    /**
     * 自定义成员方法实现登录功能
     * @param administrator
     * @return
     */
    public Administrator LoginService(Administrator administrator){
        return administratorDao.Login(administrator);
    }
}
